#ifndef TASK_TIMERID_H
#define TASK_TIMERID_H

#include "../../base/copyable.h"

class Timer;

/**
 * 标识符类, 用于标识时间事件的
 */
class TimerId : muduo::copyable {
public:
    TimerId()
            : timer_(NULL),
              sequence_(0) {
    }

    TimerId(Timer *timer, int64_t seq)
            : timer_(timer),
              sequence_(seq) {
    }

    // default copy-ctor, dtor and assignment are okay

    friend class TimerQueue;

private:
    Timer *timer_;
    int64_t sequence_;
};

#endif //TASK_TIMERID_H
